﻿<ConfigProvider Form="formValidateMessagesConfig">
    <Router AppAssembly="@typeof(Program).Assembly" AdditionalAssemblies="@Gardener.Core.Client.Impl.Extensions.ModuleExtension.AllModeuleAssemblies">
        <Found Context="routeData">
            <PageTitle>@systemConfig?.SystemName</PageTitle>
            <CascadingValue Value="routeData">
                <AuthorizeRouteView RouteData="@routeData" DefaultLayout="@typeof(MainLayout)">
                    <Authorizing>
                    </Authorizing>
                    <NotAuthorized>
                        <Gardener.Core.Client.Authorization.RedirectToLogin />
                    </NotAuthorized>
                </AuthorizeRouteView>
            </CascadingValue>
        </Found>
        <NotFound>
            <PageTitle>@systemConfig?.SystemName</PageTitle>
            <LayoutView Layout="@typeof(OtherPageLayout)">
                <Result Status="404"
                        Title="404"
                        SubTitle="@(Lo.GetValue("Page404Message"))">
                </Result>
                <div style="width:100%;text-align:center;">
                    <Button OnClick="e=>GoHome()">@Lo.GetValue("GoHome")</Button>
                </div>
            </LayoutView>
        </NotFound>
    </Router>
</ConfigProvider>